Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autotest: allow wsl2 networking bridge to be ignored #29106

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

andyp1per
Copy link
Collaborator

On Windows 11 there is a new networking option - mirrored - that allows direct access to the NIC which requires that we don't try and connect to the bridge when running simulations
https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings

@timtuxworth
Copy link
Contributor

Great find - thanks @andyp1per !

@tridge tridge added the WikiNeeded needs wiki update label Jan 22, 2025
@tridge tridge merged commit d64cf3e into ArduPilot:master Jan 22, 2025
64 checks passed
@Hwurzburg
Copy link
Collaborator

Under what situations would you use this option?

@andyp1per
Copy link
Collaborator Author

Under what situations would you use this option?

It makes the networking behave like WSL1, so much easier from a user perspective. It also considerably improves network performance so recommended by microsoft.

@andyp1per andyp1per deleted the pr-no-wsl2-network branch January 23, 2025 09:21
@Hwurzburg
Copy link
Collaborator

Hwurzburg commented Jan 23, 2025

that is what it does, not when to use it....always when you SITL under a WSL2 environment? if so, we change these startup command here: https://ardupilot.org/dev/docs/sitl-on-windows-wsl.html for all SITL startups
otherwise, needs details on when to use it

@andyp1per
Copy link
Collaborator Author

@Hwurzburg you use it if you have configured WSL2 networking to mirrored.

@Hwurzburg
Copy link
Collaborator

Sorry but I don't have the foggiest idea what that means

@andyp1per
Copy link
Collaborator Author

Not asking you to. I think it would be sufficient to document that you need this option if you have configured WSL2 in this way.

@Hwurzburg
Copy link
Collaborator

Like this? ArduPilot/ardupilot_wiki#6566

@timtuxworth
Copy link
Contributor

timtuxworth commented Jan 23, 2025

I think I would agree with @Hwurzburg that we could be more helpful explaining this to people who just want it to work.

Clearly you are saying @andyp1per that it's a good idea to configure WSL2 to use mirrored networkingMode, so the wiki should say that - it's our recommendation. I think it might be helpful to say that somewhere.

I've just tried it and it seems to make running SITL in WSL2 (especially with RealFlight) easier and faster. I'm getting 300ish frames per second in RF now which is a massive improvement on my hardware.

@andyp1per
Copy link
Collaborator Author

I think I would agree with @Hwurzburg that we could be more helpful explaining this to people who just want it to work.

Clearly you are saying @andyp1per that it's a good idea to configure WSL2 to use mirrored networkingMode, so the wiki should say that - it's our recommendation. I think it might be helpful to say that somewhere.

I've just tried it and it seems to make running SITL in WSL2 (especially with RealFlight) easier and faster. I'm getting 300ish frames per second in RF now which is a massive improvement on my hardware.

I would say its too early to tell that it should be the recommended option, but your experience is a good datapoint. If we can get a few more devs giving it the thumbs up then I agree

@timtuxworth
Copy link
Contributor

As an aside - this seems to have fixed a "Time moved backwards", problem I was having running SITL in WSL2, now gone after setting networkingMode=mirrored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants